<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.util.*,java.util.*" errorPage="/error.jsp" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
   %>
<% String username=null;
	if(session.getAttribute("login_user")==null) {
		Cookie[] cookies=request.getCookies();
		for(int i=0;i<cookies.length;i++) {
		if(cookies[i].getName().equals("loginuser@sgblog.com")) {
			session.setAttribute("login_user",cookies[i].getValue());
						}
		}
		if(session.getAttribute("login_user")==null) 
				response.sendRedirect(path+"user/login.jsp");
	} 
	username=(String)session.getAttribute("login_user");
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%=title%></title>
<base href="<%=basePath%>">
<style type="text/css">
<!--
body {
	BACKGROUND: url(<%=basePath%>images/bg.jpg)  repeat fixed;PADDING-RIGHT: 80px; PADDING-LEFT: 180px; font-size: 10pt; PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #666; PADDING-TOP: 0px; FONT-FAMILY: verdana, arial, helvetica, sans-serif; TEXT-ALIGN: left; 
}
P {
	MARGIN: 3px
}
A:link {
	COLOR: #FF6600; TEXT-DECORATION: none
}
A:visited {
	COLOR: #FF6600; TEXT-DECORATION: none
}
A:hover {
	COLOR: #ffcc33
}	

-->
</style>
</head>
<body>
<table width="728" height="44"  align="center">
  <tr>
    <td width="57"><a href="user/showlist.jsp">管理日志</a></td>
    <td width="58"><a href="user/addlog.jsp">写新日志</a></td>
    <td width="57"><a href="user/linklist.jsp">链接管理</a></td>
    <td width="65"><a href="user/addlink.jsp">添加链接</a></td>
    <td width="58"><a href="user/photolist.jsp">相册管理</a></td>
    <td width="58"><a href="user/addphoto.jsp">新增图片</a></td>
    <td width="61"><a href="user/musiclist.jsp">音乐管理</a></td>
    <td width="56"><a href="user/addmusic.jsp">增加音乐</a></td>
    <td width="61"><a href="user/favorlist.jsp">日志收藏</a></td>
    <td width="53"><a href="user/edituser.jsp">账号相关</a></td>
	<td width="60"><a href="blog/<%=username%>">返回首页</a></td>
    <td width="32"><a href="user/logout.jsp">退出</a></td>
  </tr>
</table>